package com.leofee.common;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;

/**
 * base exception
 */
@Setter
@Getter
@ToString
@AllArgsConstructor
@Slf4j
public class BaseException extends RuntimeException {

    private String msg;

    private String errorCode;

    private Exception e;

    public BaseException(String msg) {
        super(msg);
        this.msg = msg;
        log.error(msg);
    }

    public BaseException(Exception e) {
        super(e);
        log.error("", e);
    }

}
